"""
@author RansySun
@create 2019-12-03-21:31
"""
from celery import Celery

# broker: 任务仓库，要执行的任务
broker = "redis://127.0.0.1:6379/5"

# backend: 任务结果仓库
backend = "redis://127.0.0.1:6379/6"

# include: 任务函数所有文件(要执行的文件)
app = Celery(broker=broker, backend=backend, include=("celery_task.tasks"))

# 启动服务的命令
# 非windows
# >: cd 到celery_task所在文件夹下
# >: celery worker -A celery_task -l info

# windows：
# >: pip3 install eventlet
# >: cd 到celery_task所在文件夹下
# >: celery worker -A celery_task -l info -P eventlet
